<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        span{
            outline: 1px solid red;
        }
        .parent{
            width: 400px;
            height: 100px;
            background-color: rgb(228, 185, 185);
            /* margin-top: 20px; */
            /* margin-left: 30px; */
            /* border: 1px solid red; */
            /* padding-top: 1px; */
            /* padding-top: 10px; */
            /* margin-bottom: 50px; */
        }
        .child{
            width: 100px;
            height: 100px;
            background-color: rgb(73, 226, 35);
            /* border: 1px solid red; */
            /* margin-top: 20px; */
            /* margin-left: 30px; */
            margin-bottom: 20px;
        }
        .box{
            width: 100px;
            height: 100px;
            background-color: rgb(245, 134, 134);
            outline: 1px solid green;
        }
        .b1{
            margin-bottom: 50px;
        }
        .b2{
            margin-top: 40px;
        }
        .sp{
            height: 1px;
        }
    </style>
</head>
<body>
    <!-- 父子元素外边距重叠问题 -->
    <span>一排文字</sp>
    <div class="parent">
        <div class="child"></div>
    </div>
    <span>wenzi </span>
    <!-- 兄弟元素外边距 -->
    <hr>
    <div class="box b1">b1</div>
    <div class="sp"></div>
    <div class="box b2">b2</div>
</body>
</html>